<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>入门</title>
    <script src="js/jquery-3.3.1.min.js"></script>
</head>
<body>
    <div id="div1">div1...</div>
    <div id="div2">div2...</div>
<script>
    var $div1 = $("#div1");
    var $div2 = $("#div2");
    alert($div1.html());
    alert($div2.html());

</script>
</body>
</html>